home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / quicktimeintro / wiredsprites / common files / endianutilities.h < prev    next >
Encoding:
Text File  |  2000-10-06  |  1.2 KB  |  60 lines

  1. //////////
  2. //
  3. //    File:        EndianUtilities.h
  4. //
  5. //    Contains:    Utilities for managing the endian differences between operating systems.
  6. //
  7. //    Written by:    Tim Monroe
  8. //                Based on existing endian functions by various QT engineers
  9. //
  10. //    Copyright:    © 1998 by Apple Computer, Inc., all rights reserved.
  11. //
  12. //    Change History (most recent first):
  13. //
  14. //       <1>         03/27/98    rtm        first file
  15. //
  16. //////////
  17.  
  18. #pragma once
  19.  
  20. // header files
  21.  
  22. #ifndef __ENDIANUTILITIES__
  23. #define __ENDIANUTILITIES__
  24.  
  25. #ifndef __ENDIAN__
  26. #include <Endian.h>
  27. #endif
  28.  
  29. #ifndef __MOVIES__
  30. #include <Movies.h>
  31. #endif
  32.  
  33. // constants
  34.  
  35. enum {
  36.     kBtoN                    = false,
  37.     kNtoB                    = true
  38. };
  39.  
  40.  
  41. // data types
  42.  
  43. typedef struct {
  44.     ImageDescription        id;
  45.     ColorTable                ct;
  46. } ImDesc;
  47.  
  48.  
  49. // function prototypes
  50.  
  51. static void                    EndianUtils_FlipImageDescription (Boolean theNtoB, ImageDescriptionHandle theIDH);
  52. void                        EndianUtils_ImageDescription_NtoB (ImageDescriptionHandle theIDH);
  53. void                        EndianUtils_ImageDescription_BtoN (ImageDescriptionHandle theIDH);
  54. void                        EndianUtils_MatrixRecord_NtoB (MatrixRecord *theMatrix);
  55. void                        EndianUtils_RgnHandle_NtoB (RgnHandle theRgn);
  56. void                        EndianUtils_Float_NtoB (float *theFloat);
  57.  
  58. #endif    // ifndef __ENDIANUTILITIES__
  59.  
  60.